﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2021_5_24
{
    //员工类
    class Staff
    {
        private string job;

        public string Job { get => job; set => job = value; }

        public virtual void Introduction()
        {
            Console.Write("我是{0},",this.job);
        }

        public virtual void Working()
        {
            Console.WriteLine("{0}工作中...",this.job);
        }
    }
    //作家接口
    interface IWriter
    {
        void Writing();
    }
    //程序员类
    class Programmer : Staff, IWriter
    {
        public Programmer()
        {
            this.Job = "程序员";
        }

        public override void Introduction()
        {
            base.Introduction();
            Console.WriteLine("，同时我也是一个作家。");
        }

        public void Writing()
        {
            Console.WriteLine("{0}写书中...",this.Job);
        }

    }
}
